register_{$taxonomy}_taxonomy_args
Filter HookDescription
Filters the arguments for registering a specific taxonomy. The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key. Possible hook names include: - `register_category_taxonomy_args` - `register_post_tag_taxonomy_args`Hook Information
| File Location |
wp-includes/class-wp-taxonomy.php
View on GitHub
|
| Hook Type | Filter |
| Line Number | 337 |
Hook Parameters
| Type | Name | Description |
|---|---|---|
array
|
$args
|
Array of arguments for registering a taxonomy. See the register_taxonomy() function for accepted arguments. |
string
|
$taxonomy
|
Taxonomy key. |
string[]
|
$object_type
|
Array of names of object types for the taxonomy. |
Usage Examples
Basic Usage
<?php
// Hook into register_{$taxonomy}_taxonomy_args
add_filter('register_{$taxonomy}_taxonomy_args', 'my_custom_filter', 10, 3);
function my_custom_filter($args, $taxonomy, $object_type) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/class-wp-taxonomy.php:337
- How this hook is used in WordPress core
<?php
332 * @param array $args Array of arguments for registering a taxonomy.
333 * See the register_taxonomy() function for accepted arguments.
334 * @param string $taxonomy Taxonomy key.
335 * @param string[] $object_type Array of names of object types for the taxonomy.
336 */
337 $args = apply_filters( "register_{$taxonomy}_taxonomy_args", $args, $this->name, (array) $object_type );
338
339 $defaults = array(
340 'labels' => array(),
341 'description' => '',
342 'public' => true,
PHP Documentation
<?php
/**
* Filters the arguments for registering a specific taxonomy.
*
* The dynamic portion of the filter name, `$taxonomy`, refers to the taxonomy key.
*
* Possible hook names include:
*
* - `register_category_taxonomy_args`
* - `register_post_tag_taxonomy_args`
*
* @since 6.0.0
*
* @param array $args Array of arguments for registering a taxonomy.
* See the register_taxonomy() function for accepted arguments.
* @param string $taxonomy Taxonomy key.
* @param string[] $object_type Array of names of object types for the taxonomy.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/class-wp-taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.